﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace bpms.Models
{
    /// <summary>
    /// 管理员实体类
    /// </summary>
    [Table("admin_user")] 
    public class AdminUser
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Column("id")]
        public int Id { get; set; }

        [Required]
        [StringLength(100)]
        [Column("login_name")]
        public string LoginName { get; set; }

        [Required]
        [StringLength(100)]
        [Column("password")]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [Required]
        [StringLength(100)]
        [Column("name")]
        [Display(Name = "姓名")]
        public string Name { get; set; }

        [Required]
        [StringLength(100)]
        [Column("phone")]
        [Display(Name = "联系电话")]
        public string Phone { get; set; }


        [Display(Name = "注册时间")]
        public DateTime CreatedTime { get; set; }

        [Display(Name = "修改时间")]
        public DateTime? UpdatedTime { get; set; }

    }
}
